package com.eastfair.venueservice.service;

import com.eastfair.boot.service.SuperService;
import com.eastfair.venueservice.dto.ExhibitionServiceProviderDTO;
import com.eastfair.venueservice.dto.ExhibitionServiceProviderQuery;
import com.eastfair.venueservice.entity.ExhibitionServiceProvider;
import com.eastfair.venueservice.vo.ExhibitionServiceProviderVO;
import com.eastfair.venueservice.vo.ServiceProviderVO;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 业务接口
 * 展会服务商关系
 * </p>
 *
 * @author linan
 * @date 2022-07-15
 */
public interface ExhibitionServiceProviderService extends SuperService<ExhibitionServiceProvider> {

    /**
     * 查询展会服务商
     * @param query query
     * @return List<ServiceProviderVO>
     */
    List<ServiceProviderVO> queryExhibitionServiceProvider(ExhibitionServiceProviderQuery query);

    /**
     * 查询展会服务商关系.
     *
     * @param query the query
     * @return the list
     */
    List<ExhibitionServiceProvider> listExhibitionServiceProvider(ExhibitionServiceProviderDTO query);

    /**
     * 展会ID查询展会服务商关系.
     *
     * @param exhibitionManageId the exhibition manage id
     * @return the list
     */
    List<ExhibitionServiceProvider> listByExhibitionManageId(Long exhibitionManageId);

    /**
     * 展会ID，服务商ID查询展会服务商关系
     *
     * @param exhibitionManageId the exhibition manage id
     * @param serviceProviderId  the service provider id
     * @return the list
     */
    List<ServiceProviderVO> listVOByExhibitionManageId(Long exhibitionManageId, Long serviceProviderId);

    /**
     * 展会ID获取负责展馆的服务商.
     *
     * @param exhibitionId        the exhibition id
     * @param spaceCode           the space code
     * @param serviceProviderType the service provider type
     * @return the list
     */
    List<ServiceProviderVO> listServiceProvidersByExhibitionId(Long exhibitionId, List<String> spaceCode, String serviceProviderType);

    /**
     * 展会ID获取负责展馆的服务商.
     *
     * @param exhibitionId        the exhibition id
     * @param spaceCode           the space code
     * @param serviceProviderType the service provider type
     * @return map key-spaceCode, value-List<ServiceProviderVO>
     */
    Map<String, List<ServiceProviderVO>> getServiceProviderVOMapByExhibitionId(Long exhibitionId, List<String> spaceCode, String serviceProviderType);

    /**
     * 展会ID和展厅编码查询负责的主场.
     *
     * @param exhibitionId the exhibition id
     * @param spaceCode    the space code
     * @return the home by exhibition and space code
     */
    ServiceProviderVO getHomeByExhibitionIdAndSpaceCode(Long exhibitionId, String spaceCode);

    /**
     * 展会ID查询负责的主场
     *
     * @param exhibitionId the exhibition id
     * @return the home by exhibition id
     */
    ServiceProviderVO getHomeByExhibitionId(Long exhibitionId);

    /**
     * 保存展会服务商关系.
     *
     * @param exhibitionServiceProviderDTO the exhibition service provider dto
     * @return the boolean
     */
    boolean saveExhibitionServiceProvider(ExhibitionServiceProviderDTO exhibitionServiceProviderDTO);

    /**
     * 批量保存展会服务商关系.
     *
     * @param exhibitionServiceProviderDTOList the exhibition service provider dto list
     * @param exhibitionManageId               the exhibition manage id
     * @return the boolean
     */
    boolean saveBatch(List<ExhibitionServiceProviderDTO> exhibitionServiceProviderDTOList, Long exhibitionManageId);

    /**
     * 展会ID删除展会服务商关系.
     *
     * @param exhibitionManageId the exhibition manage id
     * @return the boolean
     */
    boolean removeByByExhibitionManageId(Long exhibitionManageId);

    /**
     * 移除展会下的服务商关系.
     *
     * @param exhibitionServiceProviderDTO the exhibition service provider dto
     * @return the boolean
     */
    boolean removeByServiceProvider(ExhibitionServiceProviderDTO exhibitionServiceProviderDTO);
}
